package com.unknow.first.dapp.admin.account.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.unknow.first.dapp.admin.account.mapper.AddressCoinConfig;
import com.unknow.first.dapp.admin.account.vo.ChargeVO;
import org.web3j.abi.datatypes.Address;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author Administrator
 * @description 针对表【t_address_coin_config】的数据库操作Service
 * @createDate 2022-05-17 19:49:00
 */
public interface AddressCoinConfigService extends IService<AddressCoinConfig> {

    public List<AddressCoinConfig> getList(boolean forceValid);

    /**
     * 预估手续费
     * @param addressCoinConfig
     * @param amount
     * @return
     */
    public ChargeVO estimatedCharge(Integer coinId,BigDecimal amount) throws Exception;

    public ChargeVO estimatedCharge(Integer coinId,List<Address> middlePath, BigDecimal amount) throws Exception ;

    public AddressCoinConfig getBySymbol(String symbol);
    public AddressCoinConfig getByCoinId(Integer coinId);

}
